import store from "@/store";

/**
 * 是否有该原子权限
 * @param code 权限代码
 * @returns
 */
export function hasAtomicPermission(code: string): boolean {
  const codes: string[] = store.getters.atomicCode;
  return codes.includes(code);
}

/**
 *
 * @param code 是否有该菜单
 * @returns
 */
export function hasMeunPermission(code: string): boolean {
  const codes: string[] = store.getters.meunCode;
  return codes.includes(code);
}
